package com.taxi.driver.data.duty.remote;

import com.taxi.driver.api.DriverApi;
import com.taxi.driver.data.duty.DutySource;
import com.taxi.driver.data.entity.OrderListenerEntity;
import com.taxi.driver.data.user.UserRepository;

import javax.inject.Inject;

import rx.Observable;

/**
 * 功能描述：
 */
public class DutyRemoteSource implements DutySource {

    private DriverApi mDriverApi;
    private UserRepository mUserRepository;

    @Inject
    public DutyRemoteSource(DriverApi driverApi, UserRepository userRepository) {
        mDriverApi = driverApi;
        mUserRepository = userRepository;
    }

    @Override
    public Observable<String> reqDutyStatus(boolean onlyFromRemote) {
        return mDriverApi.reqDutyStatus(mUserRepository.getDriverType());
    }

    @Override
    public Observable<String> reqOnDuty(double onWorkLng, double onWorkLat, String uploadText) {
        return mDriverApi.reqOnDuty(onWorkLng, onWorkLat, uploadText);
    }

    @Override
    public Observable<String> reqOffDuty(double offWorkLng, double offWorkLat, String uploadText) {
        return mDriverApi.reqOffDuty(offWorkLng, offWorkLat, uploadText);
    }

    @Override
    public void setWorkStatus(Boolean isWork) {

    }

    @Override
    public Boolean isWork() {
        return null;
    }

    @Override
    public void saveListenerSetting(String driverUuid, OrderListenerEntity entity) {

    }

    @Override
    public OrderListenerEntity getListenerSetting(String driverUuid) {
        return null;
    }

    @Override
    public Observable<OrderListenerEntity> reqListenerSetting(String driverUuid) {
        return null;
    }

    @Override
    public Observable<String> reqSaveListenerSetting(int remindType, String appointTimeStart, String appointTimeEnd) {
        return mDriverApi.setRemindType(remindType, appointTimeStart, appointTimeEnd);
    }
}
